package com.cskaoyan.controller;

import com.cskaoyan.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 响应Json字符串
 * @author stone
 * @date 2022/04/29 16:20
 */
//@Controller
//@ResponseBody
@RestController
@RequestMapping("json")
public class JsonController {

    @RequestMapping("user")
    //@ResponseBody
    public User jsonUser() {

        return new User("songge", "远志", 30, "male");
    }
}
